﻿@if (columnData == null)
{
	<Loading></Loading>
}
else
{
	<AntDesign.Charts.Column Data="columnData" Config="config" />
}


@code{
    public class ColumnData
    {
        public string type;
        public decimal value;
    }
    [Parameter]
    public object[] columnData { get; set; }
    [Parameter]
    public int height{ get; set; }
    [Parameter]
    public int width { get; set; }
    protected override void OnParametersSet()
    {
        config.Height = height;
        config.Width = width;
        base.OnParametersSet();
    }
    ColumnConfig config = new ColumnConfig
    {
        AutoFit = true,
        Padding = "auto",
        XField = "tidName",
        YField = "value",
        SeriesField ="tidName",
        Meta = new
        {
            Type = new
            {
                Alias = "类别"
            },
            Value = new
            {
                Alias = "值"
            }
        },
    };

}